// Copyright (C) ustc9703
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2004-7-21

#ifndef __MSGSOCKET_H_COMMON_NETMSG__
#define __MSGSOCKET_H_COMMON_NETMSG__

#pragma once
#include <common\base\jsocket.h>
#include "netmsg.h"

//##ModelId=44CF17B10196
class CJoyMsgSocket :
    public CJoySocket
{
protected:
	//##ModelId=44CF17B10198
    virtual void OnRecvData(CJoySockRecvData& data);
	//##ModelId=44CF17B1019B
    virtual void OnJoyMsg(const JoyMessage::MessageBase* msg);
	//##ModelId=44CF17B101A6
    virtual void OnBadJoyMsg(const void* buf, int size);
public:
	//##ModelId=44CF17B101AA
    CJoyMsgSocket(void);
	//##ModelId=44CF17B101AC
    virtual ~CJoyMsgSocket(void);

	//##ModelId=44CF17B101AF
    static CJoySockSendData* BuildJoyMsg(const JoyMessage::MessageBase* msg);
	//##ModelId=44CF17B101B5
    bool SendJoyMsg(const JoyMessage::MessageBase* msg);

	//##ModelId=44CF17B101B7
    void ProcessRecvData(const void* buf, int size);
};

#endif  // __MSGSOCKET_H_COMMON_NETMSG__
